#include "TcpClient.hpp"
#include <memory>

void Usage(std::string proc)
{
    std::cout << "\nUsage:\n\t" << proc << "\tserverip\tserverport\n" <<std::endl;
    exit(1);
}

int main(int argc, char* argv[])
{
    if(argc < 3)
    {
        Usage(argv[0]);
    }

    std::string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);
    std::unique_ptr<tcpc::CalClient> tcpclt(new tcpc::CalClient(serverip, serverport));
    tcpclt->initCalClient();
    tcpclt->runCalClient();
    return 0;
}